﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using DTO;
using DAO;

namespace BUS
{
    public class TongKetHocKyBUS
    {
        public static bool Insert(string hocKy, string lop, int siSo, int soLuongDat, float tyLe)
        {
            if (tyLe < 0 || tyLe > 100)
                return false;
            if (soLuongDat > siSo)
                return false;

            return TongKetHocKyDAO.Insert( hocKy,  lop,  siSo,  soLuongDat,  tyLe );           
        }

        public static DataTable TongKetHocKy(string hocKy)
        {
            return TongKetHocKyDAO.TongKetHocKy( hocKy );
        }

        public static int LoadDuLieuXuong(DataTable tb)
        {
           if( tb != null )
             return TongKetHocKyDAO.LoadDuLieuXuong( tb );
           return 0;
        }
    }
}
